home *** CD-ROM | disk | FTP | other *** search
/ ASME's Mechanical Engine…ing Toolkit 1997 December / ASME's Mechanical Engineering Toolkit 1997 December.iso / c_lang / pccstdio.lzh / SRC.LZH / FPUTS.C < prev    next >
Encoding:
C/C++ Source or Header  |  1984-07-31  |  316 b   |  19 lines

  1. /*    fputs.c - put string to file.
  2.     (C) Copyright 1984 Gregory R. Mansfield - All Rights Reserved.
  3.     G. R. Mansfield.  84/06/05.
  4.     Ver 1.1-4731.
  5. */
  6.  
  7. #include <stdio.h>
  8.  
  9. fputs(s, fp)    /* put string to file */
  10. FILE *fp;
  11. char *s;
  12. {
  13.     while (*s) {
  14.         if (*s == '\n')
  15.             putc('\r', fp);
  16.         putc(*s++, fp);
  17.     }
  18. }
  19.